package ch.trackedbean.server.data.to;

import java.io.*;
import ch.trackedbean.copier.annotations.*;
import ch.trackedbean.server.data.converter.*;
import ch.trackedbean.server.data.dom.*;
import ch.trackedbean.tracking.*;
import ch.trackedbean.validator.defaultValidators.*;

@SourceClass(AddressDom.class)
public class AddressTO implements Serializable, TrackedBean, TO {
	/**
	 * Comment for <code>serialVersionUID</code>
	 */
	private static final long serialVersionUID = 5099217355992392972L;

	/**
	 * Property constant for {@link #getKey()}/{@link #setKey(int)}. Type {@link int}.
	 */
	public static final String ATTR_KEY = "key";

	/**
	 * Property constant for {@link #getCountry()}/{@link #setCountry(CountryDom)}. Type {@link CountryDom}.
	 */
	public static final String ATTR_COUNTRY = "country";

	/**
	 * Property constant for {@link #getPlace()}/{@link #setPlace(PlaceDom)}. Type {@link PlaceDom}.
	 */
	public static final String ATTR_PLACE = "place";

	/**
	 * Property constant for {@link #getStreet()}/{@link #setStreet(String)}. Type {@link String}.
	 */
	public static final String ATTR_STREET = "street";

	/**
	 * Property constant for {@link #getStreetNr()}/{@link #setStreetNr(int)}. Type int.
	 */
	public static final String ATTR_STREET_NUMBER = "streetNr";

	private Integer key;

	private String street;

	@SimpleMapping(value = AddressDom.ATTR_STREET_NUMBER, converter = StringToInt.class)
	@Range(min = 1, max = 100)
	private int streetNr;

	private PlaceDom place;

	private CountryDom country;

	/**
	 * @return Returns the country.
	 */
	public CountryDom getCountry() {
		return country;
	}

	/**
	 * @param country The country to set.
	 */
	public void setCountry(CountryDom country) {
		this.country = country;
	}

	/**
	 * @return Returns the street.
	 */
	public String getStreet() {
		return street;
	}

	/**
	 * @param street The street to set.
	 */
	public void setStreet(String street) {
		this.street = street;
	}

	/**
	 * @return Returns the place.
	 */
	public PlaceDom getPlace() {
		return place;
	}

	/**
	 * @param place The place to set.
	 */
	public void setPlace(PlaceDom place) {
		this.place = place;
	}

	/**
	 * @return Returns the key.
	 */
	public Integer getKey() {
		return key;
	}

	/**
	 * @param key The key to set.
	 */
	public void setKey(Integer key) {
		this.key = key;
	}

	/**
	 * @return Returns the streetNr.
	 */
	public int getStreetNr() {
		return streetNr;
	}

	/**
	 * @param streetNr The streetNr to set.
	 */
	public void setStreetNr(int streetNr) {
		this.streetNr = streetNr;
	}
}
